<?php
/**
 * @filesource:					RoleAction.class.php
 * @desc:						角色管理控制器类
 * 
 * @author:						houyining
 * @copyright:					hou.yining@gmail.com
 * @date:						2011-04-09
 */
class RoleAction extends CommonAction {
	
	public function index(){
		$crumb_info = array(
			array('uri' => '__URL__', 'title' => L('role_manage'), 'sort' => C('CRUMB_LAST')),
		);
		
		$this->_mergeCrumbInfo($crumb_info);
		$this->_action_link = array('uri' => '__URL__/add', 'title' => L('add_role'));
		$this->assign('crumb_info', $this->_crumb_info);
		$this->assign('action_link', $this->_action_link);
		parent::index();
	}
	
	public function add(){
		$crumb_info = array(
			array('uri' => '__URL__', 'title' => L('role_manage'), 'sort' => C('CRUMB_DEFAULT')),
			array('uri' => '__URL__/add', 'title' => L('add_role'), 'sort' => C('CRUMB_LAST')),
		);
		
		$this->_mergeCrumbInfo($crumb_info);
		$this->_action_link = array('uri' => '__URL__/index', 'title' => L('list_role'));
		
		$this->assign('crumb_info', $this->_crumb_info);
		$this->assign('action_link', $this->_action_link);
		parent::add();
	}
	
	public function edit(){
		$crumb_info = array(
			array('uri' => '__URL__', 'title' => L('role_manage'), 'sort' => C('CRUMB_DEFAULT')),
			array('uri' => '__URL__/edit/id/' . $_REQUEST['id'], 'title' => L('edit_role'), 'sort' => C('CRUMB_LAST')),
		);

		$this->_mergeCrumbInfo($crumb_info);
		$this->_action_link = array('uri' => '__URL__/index', 'title' => L('list_role'));
		
		$this->assign('crumb_info', $this->_crumb_info);
		$this->assign('action_link', $this->_action_link);
		parent::edit();
	}
	
}
?>